package com.jinmdz.fmis.dao.dao;

import com.jinmdz.fmis.dao.dao.provider.ServiceItemProvider;
import com.jinmdz.fmis.dao.model.dictionary.ServiceDictionaryRuleItem;
import com.jinmdz.fmis.dao.model.service.ServiceItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.ArrayList;

/**
 * 服务项目Dao
 *
 * @author LiCongLu
 * @date 2020-02-12 15:40
 */
public interface ServiceItemDao {

    /**
     * 按照业务编码获取服务项目
     *
     * @param businessType 业务类型编码
     * @return
     * @author LiCongLu
     * @date 2020-02-12 15:44
     */
    @SelectProvider(type = ServiceItemProvider.class, method = "listServiceItemByBusinessType")
    ArrayList<ServiceItem> listServiceItemByBusinessType(@Param("businessType") String businessType);

    /**
     * 按照业务字典数据编码获取费用项目
     *
     * @param dictCode 字典类型编码
     * @param dataCode 字典数据编码
     * @param purpose  用途
     * @return
     * @author LiCongLu
     * @date 2020-02-12 16:29
     */
    @SelectProvider(type = ServiceItemProvider.class, method = "getServiceItemByDictCode")
    ServiceItem getServiceItemByDictCode(@Param("dictCode") String dictCode, @Param("dataCode") Integer dataCode, @Param("purpose") String purpose);

    /**
     * 通过字典编码，获取业务费用规则用途关联字典数据
     *
     * @param dictCode 字典编码
     * @param purpose  用途
     * @return
     * @author LiCongLu
     * @date 2020-03-11 17:23
     */
    @SelectProvider(type = ServiceItemProvider.class, method = "listServiceDictionaryRuleByDictCode")
    ArrayList<ServiceDictionaryRuleItem> listServiceDictionaryRuleByDictCode(@Param("dictCode") String dictCode, @Param("purpose") String purpose);


}